Admin Config tutorial.


First we need to start by understanding a config file and it's uses.



I tell people cfg's are the way to go for JK2. When I started playing and started using binds
, all of my keyboard was all used up with binds for names and for chat and other things. 
I didn't have any room to add anything else and I had to do something. Sometimes I would 
think I was talking to people and I would change my name on accident or something and so 
I looked around for something I could do to reduce the amount of binds I had on my keyboard. 
When I searched around I found cfg files on various download sites and started opening them 
with notepad and looking around to try and understand them. Now I can't live without using cfg's. 
They are easy to use (once configurered properly) and are quite helpful.

Now I have written quite a few cfg's and I keep telling people to use them but they can be 
confusing if you don't have someone around to show you how to use them. Writing a cfg yourself 
can be a little tricky but with most of my cfg's that I have released for download, most of 
the work is already done for you. In order for people not to be confused and make cfg's a lot 
easier for everyone I will show some examples and explain as much as I can to help out. Config 
files can be opened with notepad or wordpad however, there is a download for 
the JK2 Config File Editor on JK2 files that will help edit cfg files.




*** .cfg files are basically txt files with a different extention. .txt = .cfg ***

*** Always make backups !!!!!!! ***



The jk2mpconfig.cfg is a cfg file. When you hear about someone scripting they are also using 
a cfg file. They are both the same but because of the content of each they do different 
things when they are used. The jk2config.cfg is also a little hard to decipher using notepad 
so I do recommend the JK2 Config File Editor to make it much easier. Also if you use notepad 
to edit a cfg file it is a little tricker if you were to use "save as...". If you "save as" 
with notepad you must select the "all files" extention. With the cfg editor you can just 
click save as and save it wherever you want. If you want to edit a cfg file you have to be 
very careful about what you do because one mistake can mess everything up and the cfg won't work.


The jk2config.cfg is automatically run at the startup of JK2 and has all the binds and setting 
you use every time you play jk2 like forward, back, jump and attack. There are also settings 
in the cfg for your "client" settings or your "server" settings if you are running a server.






Tips for using and editing config (cfg) files.


 
The best tool you have at your disposal is NotePad.  Cfg files are basically a text document and
can be opened and edited with notepadpad.  If you have not opened a cfg file before.....you will
 need to right click on the file and click "open with" or "open".  It will ask you if you want 
to search for the appropriate program or select the program from a list.....you want to select
WordPad from the list and click the box to tell your computer to always open this type of file with WordPad.

Now the cfg is open.  



****  I will give one word of warning.  The smallest incorrect change in the cfg
can cause the cfg to work incorrectly.  A mis-spelled word or a forgotten space or anything else can be hard
to track down and fix so make sure you input everything exactly.
****


There are either simple configs or complex configs depending on the file you have.
A simple cfg would look like this:

bind o "exec config.cfg"
bind p "name yourname"
bind f "+force_protect"

A complex config will have set assignment and binding assignments
example:

//set assignments
set assign1 "vstr sel_assign"
set nextassign2 "vstr next_assign"

and so on with corresponding set assignments in the cfg.
Just don't worry about what everything else means.....we will get to that shortly.

As associated with the config files provided here, most are generic.  Meaning, you will have to
input the information you want to use manually but don't get discouraged.  WordPad incorporates
a tool that makes things easy or at least less tedious.

In the file pull down menu go to edit and scroll down to where it say replace and click replace.
This will ask you what you want to find and what you want to replace the text with.
In the configs provided, you want to find the name:

changeme

One you input the name you want to find click find next and it will find the first name to change.
When it finds the first "changeme", take note what kind of paramater you will be changing
and type whatever you want it to be:

example from chatcrazy:

//Good fight Selections                                                                                                  
set gf1 "set set_gf say changeme; set prv_gf vstr gf10; set nxt_gf vstr gf2; echo changeme"

Some of these lines include an "echo" which should also be changed to what text you want
displayed "in-game" to visually show you what you have selected before you set/execute.

example:

//Good fight Selections                                                                                                                  
set gf1 "set set_gf say Good Fight!!!; set prv_gf vstr gf10; set nxt_gf vstr gf2; echo Good Fight!!!"

You can input colors also if you wish however the echo is a little more sensitive.  If you
have a space anywhere after the echo, the next word will show up white until you
add another ^4 for another color change.  So if you want the selection to show
up as an echo exactly as it will be displayed or used, add the specific color before each word.


Once you edit the config file to say what you want you need to save the file.  Do not use "save as"!
If you have opened a cfg, "saving as" will save it as a txt file.  You will not have an option to save
it as a cfg.  For advanced users.....if you do save it as a txt file, go to your folder options and
select show extentions for known file types then click ok.  Select your file and rename the extention to cfg.


Now put the file in the base folder of JK2.....
C:program files/Lucas Arts/Star Wars Jedi Outcast II/Game data/base/

and start your game.........when you enter a server you can execute the config file by typing in the console:

exec configname.cfg  or rcon exec configname.cfg (if the cfg file is one the server)

or you can bind a key to execute the cfg with a single keystroke

bind o exec configname.cfg